﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage< IEnumerable<OnlineLibrary.ToLinq.tblUser>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	User Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

        <h2>Manage User Page
        
        </h2>
    <table border ="1px" > 
        <tr>
        <td>
            Action
        </td>
        <td>
            User ID
        </td>
         <td>
            UserName
        </td>
         <td>
            Name
        </td>
         <td>
            Password
        </td>
         <td>
            Address
        </td>
         <td>
            Role
        </td>
        </tr>
        
     <% foreach (var item in Model)
       { %> 
    
        <tr>        
        <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.UserId }) %> |
                <%: Html.ActionLink("Details", "Details", new { id = item.UserId })%> |
                <%: Html.ActionLink("Delete", "Delete", new { id = item.UserId })%>
            </td>    
            <td>
                <%: item.UserId %>
            </td>
            <td>
                <%: item.UserName %>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: item.PassWord %>
            </td>
            <td>
                <%: item.Address %>
            </td>       
            <td>
                <%: item.Role %>
            </td>            
        </tr>
    
    <% } %>

    </table>
      <p>
            <li><%: Html.ActionLink("Create User", "Create", "User")%></li>
      </p>
    
        

</asp:Content>

